package cn.jiyun.controller;

import cn.jiyun.pojo.MassagerTousu;
import cn.jiyun.service.MassagerTousuService;
import cn.jiyun.vo.ResultCommon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.AccessType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/mas")
@CrossOrigin
public class MassagerTousuController {
    @Autowired
    private MassagerTousuService massagerTousuService;
    @RequestMapping("/findAll")
    public ResultCommon findAll(){
        List<MassagerTousu> massagerTousu = massagerTousuService.findAll();
        return ResultCommon.suceessData(massagerTousu);
    }
    @PostMapping("/updatebyid")
    public ResultCommon updatebyid(@RequestBody MassagerTousu massagerTousu){
        massagerTousuService.updatebyid(massagerTousu);
        return ResultCommon.suceess();
    }
}
